home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Determining the length of an int in string form
- Date: Sun, 24 Mar 96 21:31:50 GMT
- Organization: none
- Message-ID: <827703110snz@genesis.demon.co.uk>
- References: <3146D058.DD7@cbm.com> <4i7uth$qph@inet-nntp-gw-1.us.oracle.com> <DoE38u.GIH@iquest.net> <DoGs5D.FFB@iquest.net> <4ipd9k$ep8@news.erinet.com> <Pine.SOL.3.91.960320230310.14476C-100000@darwin.UCSC.EDU> <Pine.SOL.3.91.960321120638.3532A-100000@darwin.UCSC.EDU>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <Pine.SOL.3.91.960321120638.3532A-100000@darwin.UCSC.EDU>
- royaltey@darwin.UCSC.EDU "Hal Royaltey" writes:
-
- > Another alternative is to sprintf the string into a static buffer
- >known to be long enough to hold any int, strlen the result to find the
- >actual length,
-
- Know your standard library - sprintf has a return value which is the length
- of the string it wrote.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-